/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package function;

/**
 *
 * @author asfeor
 */
import java.io.File;
import java.io.IOException;
public class Creator {
    public void Creat(String dir, String name, boolean file, boolean  folder) throws IOException {
     
        if (folder) {if (new File(dir + File.separator+ name).mkdir()) System.out.println("\n Folder was created"); 
                                                        else System.out.println("\n Folder you created earlier");}
        if (file) {
            
                if (!(new File(dir+File.separator+name).exists())) {
                    File f=new File(dir+File.separator+name); 
                    f.createNewFile(); 
                    System.out.println("\n File was created");}
                else System.out.println("\n File was created earlier");
            
  
}
        
    }
    
}
